package entity;

public class Student {
    private String name;
    private int sid;
    private String gender;
    private int age;
    private double gpa;
    private int grade;
    private boolean isInSchool;
    private String phoneNumber;
    public void displayInfo(){
        System.out.println("姓名："+name+"\n"+"学号："+sid);
    }
    //构造方法，实例化的时候被调用
    //无参构造方法
    public Student(){
        System.out.println("构造方法被调用");
    }
    //有参构造方法
    public Student(String name, int sid, String gender, int age, double gpa, int grade, boolean isInSchool, String phoneNumber) {
        this.name = name;
        this.sid = sid;
        this.gender = gender;
        this.age = age;
        this.gpa = gpa;
        this.grade = grade;
        this.isInSchool = isInSchool;
        this.phoneNumber = phoneNumber;
    }
}
